package com.polukeuro.app.client.events;

import com.google.gwt.event.shared.GwtEvent;

public class ProviderSetErrorDataEvent extends GwtEvent<ProviderHandler> {

	private static Type<ProviderHandler> TYPE = new Type<ProviderHandler>();

	private final Throwable exception;

	public ProviderSetErrorDataEvent(Throwable exception) {
		this.exception = exception;
	}

	public static Type<ProviderHandler> getType() {
		return TYPE;
	}
	
	@Override
	protected void dispatch(ProviderHandler handler) {
		handler.setErrorData(this);

	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<ProviderHandler> getAssociatedType() {
		// TODO Auto-generated method stub
		return TYPE;
	}

	public Throwable getException() {
		return exception;
	}

}
